package com.soft.javase.ch06.date;

import java.util.Date;

/**
 * @author wangzhisen
 * @Desc TODO
 * @date 2025/4/25
 */
public class DateDemo {
    public static void main(String[] args) {
        System.out.println("----------Date->long-----------");
        Date now = new Date();
        System.out.println(now);

        long l = now.getTime();
        System.out.println(l);

        System.out.println("----------long->Date-----------");
        long l1 = System.currentTimeMillis();
        System.out.println(l1);
        Date date = new Date(l1);
        System.out.println(date);
    }
}
